package com.wcards.config;

import java.util.ArrayList;
import java.util.List;

public enum CodeEnum {
    SUCCESS(200, "操作成功"),
    PARAM_CHECK_FAIL(300, "参数校验失败");
    private final Integer code;
    private final String message;

    CodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public Integer code() {
        return this.code;
    }

    public String message() {
        return this.message;
    }

    public static List<CodeEnum> getALLEnum() {
        List<CodeEnum> codeEnumList = new ArrayList<>();
        CodeEnum[] var1 = values();
        int var2 = var1.length;
        for (int var3 = 0; var3 < var2; var3++) {
            CodeEnum codeEnum = var1[var3];
            codeEnumList.add(codeEnum);
        }
        return codeEnumList;
    }
}
